﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace QLab.Utility
{
	/// <summary>
	/// Klasa koja služi za Bind-ovanje podešavanja aplikacije sa WPF property-ma
	/// Za primer korišćenja videti: http://tomlev2.wordpress.com/2008/11/18/wpf-binding-to-application-settings-using-a-markup-extension/
	/// </summary>
	public class SettingBindingExtension : Binding
	{
		public SettingBindingExtension()
		{
			Initialize();
		}

		public SettingBindingExtension(string Path)
			: base(Path)
		{
			Initialize();
		}

		private void Initialize()
		{
			this.Source = QLab.Properties.Settings.Default;
			this.Mode = BindingMode.TwoWay;
		}
	}
}
